<%@ Import Namespace="iPhOwa.Exchange" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailboxContent.ascx.cs"
	Inherits="iPhOwa.Web.Controls.MailboxContent" EnableViewState="false" %>
<div class="itemRow">
	<asp:HyperLink runat="server" ID="cl" NavigateUrl="~/ComposeMessage.aspx" CssClass="menu">
		<asp:Image runat="server" ID="ci" ImageUrl="~/Images/newemail.gif" CssClass="middle" />
		New
	</asp:HyperLink>
</div>
<asp:Panel ID="np" runat="server" Visible="false" Style="text-align: center;" CssClass="bodyDiv">
	This folder is empty.
</asp:Panel>
<asp:DataList ID="ml" runat="server" EnableViewState="false" Width="100%"
	CellPadding="0" CellSpacing="0">
	<ItemTemplate>
		<iwc:ClickablePanel runat="server" ID="md" CssClass='<%# !(bool)Eval("Read") ? "unread itemRow" : "itemRow" %>'
			Href='<%# string.Concat("ViewMessage.aspx?path=", HttpUtility.UrlEncode(Eval("Href").ToString())) %>'>
			<div>
				<span>
					<asp:Image runat="server" ID="ii" ImageUrl='<%# Eval("IconPath") %>' CssClass="middle" />
					<%# Eval("DisplayFrom") %>
				</span><span style="float: right;">
					<%# ((DateTime)Eval("DateReceived")).ToFriendlyShortDateTime() %>
				</span>
			</div>
			<div>
				<asp:Image runat="server" ID="hpi" ImageUrl="~/Images/imp-high.gif"
					Visible='<%# (int)Eval("Priority") == MessagePriority.High %>' CssClass="middle" />
				<asp:Image runat="server" ID="lpi" ImageUrl="~/Images/imp-low.gif" Visible='<%# (int)Eval("Priority")  == MessagePriority.Low %>'
					CssClass="middle" />
				<asp:Image runat="server" ID="fi" ImageUrl="~/Images/icon-flag.gif" Visible='<%# (bool)Eval("IsFlagged") && !(bool)Eval("FlagCompleted") %>'
					CssClass="middle" />
				<asp:Image runat="server" ID="ci" ImageUrl="~/Images/icon-flag-complete.gif"
					Visible='<%# (bool)Eval("IsFlagged") && (bool)Eval("FlagCompleted") %>' CssClass="middle" />
				<asp:Image runat="server" ID="ai" ImageUrl="~/Images/icon-paperclip.gif"
					Visible='<%# (bool)Eval("HasAttachment") %>' CssClass="middle" />
				<asp:Label ID="subjectLabel" runat="server" Text='<%# Eval("Subject") %>' />
			</div>
		</iwc:ClickablePanel>
	</ItemTemplate>
</asp:DataList>
<asp:Panel ID="pp" runat="server" Style="padding: 5px 5px 5px 5px; height: 20px;">
	<span>
		<asp:HyperLink runat="server" ID="pl">&lt; previous</asp:HyperLink>
	</span><span style="float: right;">
		<asp:HyperLink runat="server" ID="nl">next &gt;</asp:HyperLink>
	</span>
</asp:Panel>
